﻿using Sgr.UPMS.Application.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Sgr.UPMS.Application.Queries
{
    /// <summary>
    /// 菜单查询服务接口
    /// </summary>
    public interface IMenuQueries
    {
        /// <summary>
        /// 根据Id获取菜单信息
        /// </summary>
        /// <param name="id">菜单Id</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>菜单视图模型</returns>
        Task<OutMenuViewModel?> GetByIdAsync(
            long id,
            CancellationToken cancellationToken = default);

        /// <summary>
        /// 根据组织Id获取菜单列表
        /// </summary>
        /// <param name="request">查询条件</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>菜单列表</returns>
        Task<IEnumerable<OutMenuViewModel>> GetListAsync(
            InMenuSearchModel request,
            CancellationToken cancellationToken = default);
    }
}